package geographer;
import java.util.ArrayList;
import java.util.List;

/**
 * Project #4
 * CS 2334, 010
 * 04/02/2014
 * <P>
 * This class represents a point of interest object.
 * </P>
 * @version 1.0
 */
public class Point extends GeographicRegion 
{
	/*The serial version for object output*/
	private static final long serialVersionUID = 1L;
	
	/*The description of the point of interest*/
	String description;
	
	/*The latitude of the point of interest*/
	String lat;
	
	/*The longitude of the point of interest*/
	String lon;
	
	/*The elevation of the point of interest*/
	String elevation;
	
	/*The list of regions the point of interest belongs to*/
	List<String> belongsTo;
	
	/**
	 * The constructor for the Point.
	 * @param data     The data for the point of interest.
	 */
	public Point(String...data){
		super(data[0], null, null);
		description = data[1];
		lat = data[2];
		lon = data[3];
		elevation = data[4];
		belongsTo = new ArrayList<String>();
		
		for(int i = 5; i < data.length; ++i)
			belongsTo.add(data[i]);
	}
	
	public void edit(String[] data)
	{
		super.edit(data[0], null, null);
		description = data[1];
		lat = data[2];
		lon = data[3];
		elevation = data[4];
		belongsTo = new ArrayList<String>();
		
		for(int i = 5; i < data.length; ++i)
			belongsTo.add(data[i]);
	}
	/**
	 * The accessor for the description of the point of interest.
	 * @return  description  
	 */
	public String getDescription()
	{
		return description;
	}//end getDescription
	
	/**
	 * The accessor for the latitude of the point of interest.
	 * @return lat    The latitude of the point of interest.
	 */
	public String getLat()
	{
		return lat;
	}//end getLat
	
	/**
	 * The accessor for the longitude of the point of interest.
	 * @return lon   The longitude of the point of interest.
	 */
	public String getLon()
	{
		return lon;
	}//end getLon
	
	/**
	 * The accessor for the elevation of the point of interest.
	 * @return elevation   The elevation of the point of interest.
	 */
	public String getElevation()
	{
		return elevation;
	}//end getElevation
	
	/**
	 * The accessor for the list of regions the point of interest belongs to.
	 * @return belongsTo   The list of regions that the point of interest belongs to.
	 */
	public List<String> getBelonging()
	{
		return belongsTo;
	}//end getBelonging
	
	/**
	 * Puts the contents of the object into a single readable string.
	 * @return   The string representing the object.
	 */
	public String toString()
	{
		return "";
	}//end toString
}
